<template>
  <div ref="split" class="split">
    设备页面
    <el-button type="primary" @click="handleClick">主要按钮</el-button>
  </div>
</template>
<script setup lang="ts">
defineOptions({
  name: "DebuggerView"
});

const channel = new BroadcastChannel('test-channel');
channel.postMessage('Test from A');
channel.onmessage = (e) => console.log(e.data);

const handleClick = () => {
  console.log("主要按钮被点击 平台发送数据");
  // (window as any).platformChannel.postMessage({ type: 'plugin-reply', payload: 'Hello from Plugin!' });
  channel.postMessage('Test from A');
};

</script>
<style lang="scss" scoped></style>